<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/fuelmanagement/fuelmanagement.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/demo/fuelmanagement/fuelmanagement.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'FuelManagementId',
            footer: "Foots",
            cnName: '油费管理',
            name: 'fuelmanagement/fuelmanagement',
            url: "/basicwrite/api/fuelmanagement/",
            sortName: "CreateTime"
        });
        const editFormFields = ref({ "CarLicense": "", "FuelMoney": "", "FuelVolume": "", "StartKilometers": "", "PayType": "", "AttnName": "", "Remark": "" });
        const editFormOptions = ref([[{ "dataKey": "车牌号下拉框", "data": [], "title": "车牌号", "required": true, "field": "CarLicense", "type": "select" }],
        [{ "title": "加油费用", "required": true, "field": "FuelMoney", "type": "decimal" }],
        [{ "title": "加油量", "required": true, "field": "FuelVolume", "type": "decimal" }],
        [{ "title": "起始公里数", "required": true, "field": "StartKilometers", "type": "decimal" }],
        [{ "dataKey": "支付方式下拉框", "data": [], "title": "支付方式", "required": true, "field": "PayType", "type": "radio" }],
        [{ "dataKey": "经办人下拉框", "data": [], "title": "经办人", "required": true, "field": "AttnName", "type": "select" }],
        [{ "title": "备注", "required": true, "field": "Remark", "type": "textarea" }]]);
        const searchFormFields = ref({ "CarLicense": "", "FuelMoney": "" });
        const searchFormOptions = ref([[{ "dataKey": "车牌号下拉框", "data": [], "title": "车牌号", "field": "CarLicense", "type": "like" }, { "title": "加油费用", "field": "FuelMoney", "type": "decimal" }]]);
        const columns = ref([{ field: 'FuelManagementId', title: '主键', type: 'string', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'CarLicense', title: '车牌号', type: 'string', bind: { key: '车牌号下拉框', data: [] }, width: 110, require: true, align: 'left', sort: true },
        { field: 'FuelMoney', title: '加油费用', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'FuelVolume', title: '加油量', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'StartKilometers', title: '起始公里数', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'PayType', title: '支付方式', type: 'int', bind: { key: '支付方式下拉框', data: [] }, width: 110, require: true, align: 'left' },
        { field: 'AttnName', title: '经办人', type: 'string', bind: { key: '经办人下拉框', data: [] }, width: 110, require: true, align: 'left' },
        { field: 'Remark', title: '备注', type: 'string', width: 120, require: true, align: 'left' },
        { field: 'CreateName', title: '创建人', type: 'string', width: 110, align: 'left' },
        { field: 'CreateTime', title: '创建时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'UpdateName', title: '修改人', type: 'string', width: 110, hidden: true, align: 'left' },
        { field: 'UpdateTime', title: '修改时间', type: 'datetime', width: 150, hidden: true, align: 'left', sort: true },
        { field: 'IsDel', title: '逻辑删除', type: 'int', width: 110, hidden: true, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
